package Taxonomy;

use JIP::ToolSet; # load my commonly-used modules in a single import

use Exporter::Lite;

our @EXPORT_OK = qw(
    getAllTaxonomies
    contentTypeToTableName
    contentTypeToTableType
    contentTypeToTempTableName
);

my %content = (
    other    => 'file',
    audio    => 'file',
    video    => 'file',
    images   => 'file',
    text     => 'file',
    pictures => 'file',
    archives => 'file',
    sources  => 'file',
    folders  => 'dir',
);

sub getAllTaxonomies { return keys %content }

sub contentTypeToTableName {
    my $contentType = shift;

    return "ftpFiles". ucfirst( $contentType );
}

sub contentTypeToTableType {
    my $contentType = shift;

    return $content{ $contentType };
}

sub contentTypeToTempTableName {
    my $contentType = shift;

    return "tmp_ftpFiles". ucfirst( $contentType );
}

1;
